/**
 * Created by huzhihui on 2017/8/24.
 */
import React from "react";
import {connect} from "dva";
import {Link} from "dva/router";
import "./index.css";
import {Button, Modal} from "antd";
import logo from "../../logo.svg";


function Index() {

    /** 展示开发者信息 */
    function openAuthorInfo(message) {
        Modal.info({
            title: '开发作者信息',
            content: (
                <div>
                    <h3>微信号码：li742032660</h3>
                    <h3>联系邮箱：huzhihui_c@qq.com</h3>
                    <br/>
                    <h3>{message}</h3>
                </div>
            ),
            onOk() {
            },
        });
    }

    return (
        <div className="main">
            <div className="">
                <img src={logo} alt="" className="App-logo"/>
            </div>
            <h1>欢迎使用 aibton framework java快速开发框架</h1>
            <div>
                <Button type="primary" onClick={openAuthorInfo.bind(this, "有好的建议可以联系作者哦")}
                        className="margin-5px">联系作者</Button>
                <Link to="/api">
                    <Button type="primary" className="margin-5px">快速开始</Button>
                </Link>
            </div>
        </div>
    );
}

Index.protoTypes = {};

export default connect()(Index);